#include<stdio.h>
#include<signal.h>
#include<stdlib.h>
#include<unistd.h>
void handel(int sigNum)
{
    printf("收到%d号信号\n",sigNum);
}
int main()
{
    signal(2,handel);
    while(1)
    {
        printf("I am running\n");
        sleep(2);
    }
    return 0;
}